<?php
include("Conexion.php");

$Query = "select * from datosgenerales where IdTipo = 2 and activo = 1 and IdDatosGenerales not in(select DatosUsuario from usuarios) ;";
$ExecQuery = mysql_query($Query)or die(mysql_error());
$Cuantos = mysql_num_rows($ExecQuery);

	for($i=0;$i<$Cuantos;$i++){
		echo "<option value='".mysql_result($ExecQuery, $i,"IdDatosGenerales")."'>".mysql_result($ExecQuery, $i,"Nombre")." ".mysql_result($ExecQuery, $i,"ApPat")." ".mysql_result($ExecQuery, $i,"ApMat")."</option>";
	}

?>